package com.xueyi.aixihu.response;

import com.xueyi.aixihu.entity.vo.DtNewsVo;
import lombok.Data;

import java.util.List;

/**
 * @authoer:hxs
 * @createDate:2022/8/18
 * @description: 返回条件查询的文章列表
 */
@Data
public class ArticleListResponse {

    /**
     * 文章总数
     */
    private Integer total;


    /**
     * 文章列表
     */
    private List<DtNewsVo> dtNewsVoList;

    /**
     * 待审核、审核中、已通过
     */
    private int waitSubmitNumber;
    private int auditNumber;
    private int okNumber;


    public ArticleListResponse setWaitSubmitNumber(int waitSubmitNumber) {
        this.waitSubmitNumber = waitSubmitNumber;
        return this;
    }

    public ArticleListResponse setAuditNumber(int auditNumber) {
        this.auditNumber = auditNumber;
        return this;
    }

    public ArticleListResponse setOkNumber(int okNumber) {
        this.okNumber = okNumber;
        return this;
    }

    public ArticleListResponse dtNewsVoList(List<DtNewsVo> dtNewsVoList) {
        this.dtNewsVoList = dtNewsVoList;
        return this;
    }

    public ArticleListResponse total() {
        this.total = waitSubmitNumber+auditNumber+okNumber;
        return this;
    }

}
